package com.quectel.constant.core.workorder;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * 工单的常量
 *
 * @author caolu
 * @email louis.cao@quectel.com
 */
public class WorkOrderConstants {

    public static final String WORK_ORDER_CATEGORIES = "categories";

    /*
     * 工单来源 为以下几种
     */
    /**
     * 告警
     */
    public static final Byte ORDER_SOURCE_ALARM = 1;
    /**
     * 前端用户
     */
    public static final Byte ORDER_SOURCE_HOUSEHOLD = 2;
    /**
     * 管理员创建
     */
    public static final Byte ORDER_SOURCE_ADMIN = 3;

    /**
     * 网格员
     */
    public static final Byte ORDER_SOURCE_GRID_MEMBER = 4;

    /**
     * 员工
     */
    public static final Byte ORDER_SOURCE_DEPT_PERSON = 5;


    /*
     * 工单处理人员类型 为以下几种
     */
    /**
     * 管理员
     */
    public static final Byte ORDER_HANDLER_TYPE_ADMIN = 1;

    public static final Byte ORDER_HANDLER_TYPE_DEPT_PERSON = 2;




    /*
     * 工单的完成状态为以下几种
     */
    /**
     * 初始化
     */
    public static final Byte ORDER_STATUS_INIT = 0;
    /**
     * 已接单
     */
    public static final Byte ORDER_STATUS_HANDLING = 1;
    /**
     * 已指派
     */
    public static final Byte ORDER_STATUS_FORWARD = 2;
    /**
     * 已完成
     */
    public static final Byte ORDER_STATUS_FINISHED = 3;
    /**
     * 已评价
     */
    public static final Byte ORDER_STATUS_COMMENTED = 4;


    /**
     *
     */
    @AllArgsConstructor
    public enum WorkOrderCategory {
        /**
         * 家庭报修
         */
        WORK_ORDER_FAMILY_REPAIR("WorkOrderFamilyRepair", (byte) 1),

        /**
         * 公共报修
         */
        WORK_ORDER_PUBILC_REPAIR("WorkOrderPublicRepair", (byte) 2),

        /**
         * 投诉举报
         */
        WORK_ORDER_COMPLAINT("WorkOrderComplaint", (byte) 3),

        /**
         * 巡检上报
         */
        WORK_ORDER_PARTROL_REPORT("WorkOrderPartrolReport", (byte) 4);

        @Getter
        @Setter
        private String mark;

        @Getter
        @Setter
        private Byte category;
    }

    /**
     * 工单分类
     */
    @AllArgsConstructor
    public enum CategoryAndType {
        /**
         * 安防巡检
         */
        SECURITY_PATROL((byte) 4, (byte) 1),
        /**
         * 设备巡检
         */
        DEVICE_PATROL((byte) 4, (byte) 2),
        /**
         * 视频巡更分类
         */
        VIDEO_PATROL((byte) 4, (byte) 3);

        @Getter
        @Setter
        private Byte category;
        @Getter
        @Setter
        private Byte type;
    }


}
